// console.log('process.env:',process.env);
/*
process.env: { ALLUSERSPROFILE: 'C:\\ProgramData',
  APPDATA: 'C:\\Users\\Administrator\\AppData\\Roaming',
  COLORTERM: 'true',
  CommonProgramFiles: 'C:\\Program Files\\Common Files',
  'CommonProgramFiles(x86)': 'C:\\Program Files (x86)\\Common Files',
  CommonProgramW6432: 'C:\\Program Files\\Common Files',
  COMPUTERNAME: 'KOTIN',
  ComSpec: 'C:\\windows\\system32\\cmd.exe',
  DEBUG_COLORS: 'true',
  DriverData: 'C:\\Windows\\System32\\Drivers\\DriverData',
  ELECTRON_NO_ATTACH_CONSOLE: 'true',
  FORCE_COLOR: 'true',
  FPS_BROWSER_APP_PROFILE_STRING: 'Internet Explorer',
  FPS_BROWSER_USER_PROFILE_STRING: 'Default',
  HOMEDRIVE: 'C:',
  HOMEPATH: '\\Users\\Administrator',
  LOCALAPPDATA: 'C:\\Users\\Administrator\\AppData\\Local',
  LOGONSERVER: '\\\\KOTIN',
  MOCHA_COLORS: '1',
  npm_config_color: 'always',
  NUMBER_OF_PROCESSORS: '16',
  OneDrive: 'C:\\Users\\Administrator\\OneDrive',
  OS: 'Windows_NT',
  Path:
   'D:\\NetSarang\\Xshell 6\\;C:\\windows\\system32;C:\\windows;C:\\windows\\System32\\Wbem;C:\\windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\windows\\System32\\OpenSSH\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NGX;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;C:\\Program Files\\Microsoft VS Code\\bin;D:\\phpStudy\\PHPTutorial\\php\\php-7.2.1-nts;C:\\ProgramData\\ComposerSetup\\bin;C:\\Program Files\\Git\\cmd;C:\\Program Files\\nodejs\\;C:\\Program Files\\Redis\\;C:\\Users\\Administrator\\.windows-build-tools\\python27\\;C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\npm-lifecycle\\node-gyp-bin;C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\windows-build-tools\\node_modules\\.bin;C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\.bin;C:\\Users\\Administrator\\bin;C:\\Program Files\\Git\\mingw64\\bin;C:\\Program Files\\Git\\usr\\local\\bin;C:\\Program Files\\Git\\usr\\bin;C:\\Program Files\\Git\\usr\\bin;C:\\Program Files\\Git\\mingw64\\bin;C:\\Program Files\\Git\\usr\\bin;C:\\Users\\Administrator\\bin;C:\\windows\\system32;C:\\windows;C:\\windows\\System32\\Wbem;C:\\windows\\System32\\WindowsPowerShell\\v1.0;C:\\windows\\System32\\OpenSSH;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NGX;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;C:\\Program Files\\Microsoft VS Code\\bin;D:\\phpStudy\\PHPTutorial\\php\\php-7.2.1-nts;C:\\ProgramData\\ComposerSetup\\bin;C:\\Program Files\\Git\\cmd;C:\\Program Files\\nodejs;C:\\Program Files\\Redis;C:\\Users\\Administrator\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\Administrator\\AppData\\Roaming\\Composer\\vendor\\bin;C:\\Users\\Administrator\\AppData\\Roaming\\npm;C:\\Program Files\\MongoDB\\Server\\4.0\\bin;C:\\Program Files\\Git\\usr\\bin\\vendor_perl;C:\\Program Files\\Git\\usr\\bin\\core_perl;D:\\elasticsearch-7.1.1\\bin;',
  PATHEXT: '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC',
  PROCESSOR_ARCHITECTURE: 'AMD64',
  PROCESSOR_IDENTIFIER: 'AMD64 Family 23 Model 8 Stepping 2, AuthenticAMD',
  PROCESSOR_LEVEL: '23',
  PROCESSOR_REVISION: '0802',
  ProgramData: 'C:\\ProgramData',
  ProgramFiles: 'C:\\Program Files',
  'ProgramFiles(x86)': 'C:\\Program Files (x86)',
  ProgramW6432: 'C:\\Program Files',
  PSModulePath:
   'C:\\Program Files\\WindowsPowerShell\\Modules;C:\\windows\\system32\\WindowsPowerShell\\v1.0\\Modules',
  PUBLIC: 'C:\\Users\\Public',
  SESSIONNAME: 'Console',
  SystemDrive: 'C:',
  SystemRoot: 'C:\\windows',
  TEMP: 'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp',
  TMP: 'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp',
  USERDOMAIN: 'KOTIN',
  USERDOMAIN_ROAMINGPROFILE: 'KOTIN',
  USERNAME: 'Administrator',
  USERPROFILE: 'C:\\Users\\Administrator',
  windir: 'C:\\windows' }
*/

/** 我们一般会通过设置环境变量来区分开发环境和生产环境*/
//mac/linux -> 通过export命令  export x=a
//windows -> 通过set命令
//cross-env包能帮助我们跨端设置环境变量(兼容上面两种)

//在命令行中输入set abc=123，再在当前命令行中运行本文件↓
console.log(process.env.abc); //输出123

if(process.env.NODE_ENV === 'production'){
  url = 'www.ahhh.com';
}else{
  url = '127.0.0.1';
}
/** ↑为撒生产环境下 我们在浏览器中上面区分环境变量的代码也能跑呢?*/
//为了在浏览器中也能跑 打包器会在 window.process = {env:'development'}

